package com.st.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("`order`")
public class Order {
    /**
     * 订单ID
     */
    @TableId(value = "id")
    private String id;

    /**
     * 订单状态 1:待支付 2:待出行 3:退款 4:已完成
     */
    private Integer orderStatu;

    /**
     * 订单生成时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date orderTime;

    /**
     * 支付状态
     */
    private Integer payStatu;

    /**
     * 景点ID
     */
    private Integer attractionsId;

    /**
     * 购买票数
     */
    private Integer ticketNum;

    /**
     * 联系人姓名
     */
    private String contactName;

    /**
     * 联系人电话
     */
    private String contactPhone;

    /**
     * 联系人身份证号
     */
    private String contactIdCart;

    /**
     * 订单金额
     */
    private Double orderMoney;

    /**
     * 用户id
     */
    private Integer userId;

    private String time;

    @TableField(exist = false)
    private Attractions attractions;

    @TableField(exist = false)
    private User user;

}

